package com.steel.yfmall.cloud.assistant.controller;

import com.alibaba.fastjson.JSON;
import com.steel.yfmall.cloud.assistant.api.stock.CqOrderService;
import com.steel.yfmall.cloud.assistant.bean.param.ZgOrderParamBean;
import com.steel.yfmall.cloud.assistant.bean.result.ContractInfoBean;
import com.steel.yfmall.cloud.components.utils.base.APIMsgBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: CqOrderController
 * @author: liuzhijun
 * @date: 2021-04-08 13:09
 **/
@RestController
@Slf4j
public class CqOrderController {



    /**
     * SO01-订单建立
     *
     * @param zgOrderParamBean 订单号	orderNo
     * @return
     */
    @RequestMapping(value = "createPushOrderToCq")
    public APIMsgBean<ContractInfoBean> createPushOrderToCq(@RequestBody ZgOrderParamBean zgOrderParamBean) {
        if (log.isDebugEnabled()) {
            log.info("function createPushOrderToCq :" + JSON.toJSONString(zgOrderParamBean));
        }
        return cqOrderService.createPushOrderToCq(zgOrderParamBean);
    }

    @Resource
    private CqOrderService cqOrderService;

}
